package com.hisense.ovcloud.apicontrol.config;

import com.hisense.ovcloud.apicontrol.dto.req.ValidateReq;
import com.hisense.ovcloud.common3.validator.BaseValidator;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.validation.Validator;

import java.util.List;

@Configuration
@Order(-999)
public class ValidatorsConfig {

    @Bean
    @Qualifier("validateReqValidator")
    public Validator ValidateReqValidator(){
        return new BaseValidator(ValidateReq.class, List.of("wifiId"));
    }
}
